package game.model.converter;

import common.model.po.GCreature;
import game.model.request.SaveCreatureRequest;

/**
 * @author 米泽鹏
 * @since 2022-2-28 下午 4:55
 */
public class GCreatureConverter {

	public static GCreature saveRequestToPo(SaveCreatureRequest saveCreatureRequest) {
		if (saveCreatureRequest == null) {
			return null;
		}
		GCreature gCreature = new GCreature();
		gCreature.setCreatureName(saveCreatureRequest.getCreatureName());
		gCreature.setDurability(saveCreatureRequest.getDurability());
		gCreature.setDamage(saveCreatureRequest.getDamage());
		gCreature.setDescription(saveCreatureRequest.getDescription());
		gCreature.setSort(saveCreatureRequest.getSort());
		gCreature.setClassificationId(saveCreatureRequest.getClassificationId());
		gCreature.setImage(saveCreatureRequest.getImage());
		gCreature.setId(saveCreatureRequest.getId());
		return gCreature;
	}
}
